{% extends 'base.html' %}
{% block title%} Repositorys {% endblock %}

{% block content %}

<div class="criteria">	
<b>Repository Search</b>
	<div id="repository_search_crit">
	
		<form action="/repositorys/" method="get">
			<div><label for="id_name">Name:</label> {{ criteria.name }}</div>
			<div><label for='id_project'>Project:</label> {{ criteria.project }}</div>
			<div><input type="submit" value="Search"></div>
		</form>
	</div>
</div>
<div class="results">
	<b> Repositorys: </b>
	<table class="data-table"><tbody>
	<tr> <th>Name</th> <th>Project</th> <th>URL</th> <th>View</th> <th>Edit</th><th>Delete</th> </tr>
	{% for r in repos %}
		<tr class={% cycle '' 'alt' %}>
			<td>{{ r.name }}</td> 
			<td>{{ r.project }}</td>
			<td> <a href='{{ r.url }}'>{{ r.url }}</a></td>
			<td><a href='/repository/view/{{ r.pk }}/'> View</a></td> 
			<td><a href='/repository/edit/{{ r.pk }}/'> Edit</a></td>
			<td><a href='/repository/delete/{{ r.pk }}/'> Delete</a></td>
		</tr>
	{% endfor %}
	</tbody></table>
	
	<div id="add_repository">	<a href="/repository/new/">Add New Repository</a></div>
	
</div>
{% endblock %}